﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;

namespace SCPKeyGen
{
    public partial class MainKeyGen : Form
    {
        public MainKeyGen()
        {
            InitializeComponent();
        }

        public static string _encode(string strInput)
        {
            strInput = "cicipoc" + strInput + "SimplePenaltyCalculator";
            byte[] pass = Encoding.UTF8.GetBytes(strInput);
            MD5 md5 = new MD5CryptoServiceProvider();
            return Convert.ToBase64String(md5.ComputeHash(pass));
        }

        private void B_Generate_Click(object sender, EventArgs e)
        {
            TB_Key.Text = _encode(TB_For.Text);
        }
    }
}
